package first

/**
  * Created by feng on 16/11/2018.
  */

class Marker private(val color:String){

  println("创建"+this)

  override def toString():String="颜色标记:"+color
}


object Marker{

  private  val markers:Map[String,Marker] = Map(
    "red"->new Marker("red"),
    "blue"->new Marker("blue"),
    "green"->new Marker("green")
  )

}